]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st: Remove StIconType
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 30 May 2012 13:58:37 +0000 (09:58 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 29 Aug 2012 19:41:09 +0000 (16:41 -0300)
GTK+ works by explicitly specifying a -symbolic suffix for all icons.
Do the same here.

https://bugzilla.gnome.org/show_bug.cgi?id=682540

32 files changed:
js/ui/autorunManager.js
js/ui/ctrlAltTab.js
js/ui/dash.js
js/ui/endSessionDialog.js
js/ui/keyboard.js
js/ui/lookingGlass.js
js/ui/messageTray.js
js/ui/notificationDaemon.js
js/ui/overview.js
js/ui/panel.js
js/ui/panelMenu.js
js/ui/remoteSearch.js
js/ui/shellMountOperation.js
js/ui/status/accessibility.js
js/ui/status/bluetooth.js
js/ui/status/network.js
js/ui/status/power.js
js/ui/status/volume.js
js/ui/telepathyClient.js
js/ui/userMenu.js
js/ui/viewSelector.js
js/ui/wanda.js
src/gnome-shell-extension-tool.in
src/st/st-entry.c
src/st/st-icon.c
src/st/st-icon.h
src/st/st-private.c
src/st/st-private.h
src/st/st-texture-cache.c
src/st/st-texture-cache.h
src/st/st-types.h
tests/interactive/icons.js

index e93fbfc9ae089b52888911e3da5817f88e96926b..2776fbb6d5cbe4fd3b856b01d72c4217a88a286c 100644 (file)
@@ -261,7 +261,7 @@ const AutorunResidentSource = new Lang.Class({
     Extends: MessageTray.Source,
 
     _init: function() {
-        this.parent(_("Removable Devices"), 'media-removable', St.IconType.FULLCOLOR);
+        this.parent(_("Removable Devices"), 'media-removable');
         this.showInLockScreen = false;
 
         this._mounts = [];
index 3462eac2362a255edabdb211ac018d42845e6575..bd9bb1452816adbb2e405b45cb2cb89dfb675eee 100644 (file)
@@ -318,7 +318,6 @@ const CtrlAltTabSwitcher = new Lang.Class({
         let icon = item.iconActor;
         if (!icon) {
             icon = new St.Icon({ icon_name: item.iconName,
-                                 icon_type: St.IconType.SYMBOLIC,
                                  icon_size: POPUP_APPICON_SIZE });
         }
         box.add(icon, { x_fill: false, y_fill: false } );
index b4de3ea5f0115165a490cbd8a547ab760f8fc07f..6299765a1986cfb946b818c43ad0718d340a8b16 100644 (file)
@@ -256,10 +256,9 @@ const ShowAppsIcon = new Lang.Class({
 
     _createIcon: function(size) {
         this._iconActor = new St.Icon({ icon_name: 'view-grid-symbolic',
+                                        icon_size: size,
                                         style_class: 'show-apps-icon',
-                                        track_hover: true,
-                                        icon_type: St.IconType.SYMBOLIC,
-                                        icon_size: size });
+                                        track_hover: true });
         return this._iconActor;
     },
 
index d9f98933e90b36001b9b84b7fc8055a01bec6061..a4871962403a6b5741ba48c7932cf742a5208f3b 100644 (file)
@@ -89,7 +89,7 @@ const shutdownDialogContent = {
                        label:  C_("button", "Restart") },
                      { signal: 'ConfirmedShutdown',
                        label:  C_("button", "Power Off") }],
-    iconName: 'system-shutdown',
+    iconName: 'system-shutdown-symbolic',
     iconStyleClass: 'end-session-dialog-shutdown-icon'
 };
 
@@ -104,7 +104,7 @@ const restartDialogContent = {
     endDescription: _("Restarting the system."),
     confirmButtons: [{ signal: 'ConfirmedReboot',
                        label:  C_("button", "Restart") }],
-    iconName: 'system-shutdown',
+    iconName: 'system-shutdown-symbolic',
     iconStyleClass: 'end-session-dialog-shutdown-icon'
 };
 
@@ -327,7 +327,6 @@ const EndSessionDialog = new Lang.Class({
             let textureCache = St.TextureCache.get_default();
             let icon = textureCache.load_icon_name(this._iconBin.get_theme_node(),
                                                    iconName,
-                                                   St.IconType.SYMBOLIC,
                                                    _DIALOG_ICON_SIZE);
 
             this._iconBin.child = icon;
index fcacc50cb6ac4283bf28c6b7f814637f3f54ac41..57e4db4274e0fa0eb509caa59e0c9adf646ff82e 100644 (file)
@@ -542,7 +542,7 @@ const KeyboardSource = new Lang.Class({
 
     _init: function(keyboard) {
         this._keyboard = keyboard;
-        this.parent(_("Keyboard"), 'input-keyboard', St.IconType.SYMBOLIC);
+        this.parent(_("Keyboard"), 'input-keyboard-symbolic');
     },
 
     handleSummaryClick: function() {
index ac89d4353cd49fea2e88355708b0ec65ef4f2e02..33f5c86dfe499882717feda2b625ac4affb1e0b2 100644 (file)
@@ -869,7 +869,6 @@ const LookingGlass = new Lang.Class({
         let toolbar = new St.BoxLayout({ name: 'Toolbar' });
         this.actor.add_actor(toolbar);
         let inspectIcon = new St.Icon({ icon_name: 'gtk-color-picker',
-                                        icon_type: St.IconType.FULLCOLOR,
                                         icon_size: 24 });
         toolbar.add_actor(inspectIcon);
         inspectIcon.reactive = true;
index 2a33a1c550a2f5aaf4e77eaa0a2b93fcc75b4d02..9d155975ad418baf02fb508e3a92f85bc3e31a0b 100644 (file)
@@ -1034,10 +1034,9 @@ const Source = new Lang.Class({
 
     SOURCE_ICON_SIZE: 48,
 
-    _init: function(title, iconName, iconType) {
+    _init: function(title, iconName) {
         this.title = title;
         this.iconName = iconName;
-        this.iconType = iconType;
 
         this.isTransient = false;
         this.isChat = false;
@@ -1084,7 +1083,6 @@ const Source = new Lang.Class({
     // something more fancy.
     createIcon: function(size) {
         return new St.Icon({ icon_name: this.iconName,
-                             icon_type: this.iconType,
                              icon_size: size });
     },
 
@@ -2461,7 +2459,7 @@ const SystemNotificationSource = new Lang.Class({
     Extends: Source,
 
     _init: function() {
-        this.parent(_("System Information"), 'dialog-information', St.IconType.SYMBOLIC);
+        this.parent(_("System Information"), 'dialog-information-symbolic');
         this.setTransient(true);
     },
 
index 80803cf7e9ae8e1cd05854bfcc442841a7d65681..fb580fe107a8dac203f8719e6b8de07bd5604f23 100644 (file)
@@ -357,7 +357,6 @@ const NotificationDaemon = new Lang.Class({
 
         let gicon = this._iconForNotificationData(icon, hints);
         let iconActor = new St.Icon({ gicon: gicon,
-                                      icon_type: St.IconType.FULLCOLOR,
                                       icon_size: MessageTray.NOTIFICATION_ICON_SIZE });
 
         if (notification == null) {
index 2c706a22d8914b75698b7772d24932a8c65bd3ee..a319a3bf929cff06a3c65c1c87e0376cbd051386 100644 (file)
@@ -210,7 +210,7 @@ const Overview = new Lang.Class({
 
         // Translators: this is the name of the dock/favorites area on
         // the left of the overview
-        Main.ctrlAltTabManager.addGroup(this._dash.actor, _("Dash"), 'user-bookmarks');
+        Main.ctrlAltTabManager.addGroup(this._dash.actor, _("Dash"), 'user-bookmarks-symbolic');
 
         Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
         this._relayout();
index 631a0a11c79ae80e16df330a155d465594e02606..28a5ca3d2a5442f85afa061967fecbfdb2e21f98 100644 (file)
@@ -968,7 +968,7 @@ const Panel = new Lang.Class({
         this._menus.addMenu(this._dateMenu.menu);
 
         Main.layoutManager.panelBox.add(this.actor);
-        Main.ctrlAltTabManager.addGroup(this.actor, _("Top Bar"), 'start-here',
+        Main.ctrlAltTabManager.addGroup(this.actor, _("Top Bar"), 'start-here-symbolic',
                                         { sortGroup: CtrlAltTab.SortGroup.TOP });
     },
 
index 3e48f6207173891c07f2457f653c0392682c33b2..0983a92bd8fefc2495e73471383c87b573195387 100644 (file)
@@ -242,7 +242,6 @@ const SystemStatusButton = new Lang.Class({
 
     addIcon: function(gicon) {
         let icon = new St.Icon({ gicon: gicon,
-                                 icon_type: St.IconType.SYMBOLIC,
                                  style_class: 'system-status-icon' });
         this._box.add_actor(icon);
 
index 2004dc31b2ab4b2550b0072a22c63922b26606f5..35176f4fbadec1653413f6f06dd1abbb4aa1c60f 100644 (file)
@@ -117,8 +117,7 @@ const RemoteSearchProvider = new Lang.Class({
     createIcon: function(size, meta) {
         if (meta['gicon']) {
             return new St.Icon({ gicon: Gio.icon_new_for_string(meta['gicon']),
-                                 icon_size: size,
-                                 icon_type: St.IconType.FULLCOLOR });
+                                 icon_size: size });
         } else if (meta['icon-data']) {
             let [width, height, rowStride, hasAlpha,
                  bitsPerSample, nChannels, data] = meta['icon-data'];
@@ -129,8 +128,7 @@ const RemoteSearchProvider = new Lang.Class({
 
         // Ugh, but we want to fall back to something ...
         return new St.Icon({ icon_name: 'text-x-generic',
-                             icon_size: size,
-                             icon_type: St.IconType.FULLCOLOR });
+                             icon_size: size });
     },
 
     _getResultsFinished: function(results, error) {
index 907df117025c78d7bed9052f5498f471fc5112c8..06eb814bf72deccf7c5d104e21f08c501e7d7b43 100644 (file)
@@ -240,7 +240,7 @@ const ShellUnmountNotifier = new Lang.Class({
     Extends: MessageTray.Source,
 
     _init: function() {
-        this.parent('', 'media-removable', St.IconType.FULLCOLOR);
+        this.parent('', 'media-removable');
 
         this._notification = null;
         Main.messageTray.add(this);
index a2409f67c1a5f08b677c3996d4cf3f732bd8b73f..d06dd25c7d25d886d0457406b6a6f42fc3bda1ad 100644 (file)
@@ -36,7 +36,7 @@ const ATIndicator = new Lang.Class({
     Extends: PanelMenu.SystemStatusButton,
 
     _init: function() {
-        this.parent('preferences-desktop-accessibility', _("Accessibility"));
+        this.parent('preferences-desktop-accessibility-symbolic', _("Accessibility"));
 
         let highContrast = this._buildHCItem();
         this.menu.addMenuItem(highContrast);
index c9ba1fc87e9839451941657f0e3600c91793652b..5086d7710bc4d730aa55f0445dbce4497e8b86b1 100644 (file)
@@ -24,7 +24,7 @@ const Indicator = new Lang.Class({
     Extends: PanelMenu.SystemStatusButton,
 
     _init: function() {
-        this.parent('bluetooth-disabled', _("Bluetooth"));
+        this.parent('bluetooth-disabled-symbolic', _("Bluetooth"));
 
         this._applet = new GnomeBluetoothApplet.Applet();
 
@@ -111,10 +111,10 @@ const Indicator = new Lang.Class({
 
         if (on) {
             this._discoverable.actor.show();
-            this.setIcon('bluetooth-active');
+            this.setIcon('bluetooth-active-symbolic');
         } else {
             this._discoverable.actor.hide();
-            this.setIcon('bluetooth-disabled');
+            this.setIcon('bluetooth-disabled-symbolic');
         }
     },
 
@@ -306,7 +306,7 @@ const Indicator = new Lang.Class({
 
     _ensureSource: function() {
         if (!this._source) {
-            this._source = new MessageTray.Source(_("Bluetooth"), 'bluetooth-active', St.IconType.SYMBOLIC);
+            this._source = new MessageTray.Source(_("Bluetooth"), 'bluetooth-active-symbolic');
             Main.messageTray.add(this._source);
         }
     },
index 72cea774c73b6992cc6e1df9b270fe2e5824b462..980563eb63bf24b724703aea722684dfd938e4f8 100644 (file)
@@ -122,7 +122,7 @@ const NMNetworkMenuItem = new Lang.Class({
         this._secureIcon = new St.Icon({ style_class: 'popup-menu-icon' });
         if (this.bestAP._secType != NMAccessPointSecurity.UNKNOWN &&
             this.bestAP._secType != NMAccessPointSecurity.NONE)
-            this._secureIcon.icon_name = 'network-wireless-encrypted';
+            this._secureIcon.icon_name = 'network-wireless-encrypted-symbolic';
         this._icons.add_actor(this._secureIcon);
     },
 
@@ -133,9 +133,9 @@ const NMNetworkMenuItem = new Lang.Class({
 
     _getIcon: function() {
         if (this.bestAP.mode == NM80211Mode.ADHOC)
-            return 'network-workgroup';
+            return 'network-workgroup-symbolic';
         else
-            return 'network-wireless-signal-' + signalToIcon(this.bestAP.strength);
+            return 'network-wireless-signal-' + signalToIcon(this.bestAP.strength) + '-symbolic';
     }
 });
 
@@ -761,7 +761,7 @@ const NMDeviceModem = new Lang.Class({
     },
 
     _getSignalIcon: function() {
-        return 'network-cellular-signal-' + signalToIcon(this.mobileDevice.signal_quality);
+        return 'network-cellular-signal-' + signalToIcon(this.mobileDevice.signal_quality) + '-symbolic';
     },
 
     _createSection: function() {
@@ -1469,7 +1469,7 @@ const NMDeviceWireless = new Lang.Class({
                                                                { reactive: false });
         else
             this._activeConnectionItem = new PopupMenu.PopupImageMenuItem(title,
-                                                                          'network-wireless-connected',
+                                                                          'network-wireless-connected-symbolic',
                                                                           { reactive: false });
         this._activeConnectionItem.setShowDot(true);
     },
@@ -1570,7 +1570,7 @@ const NMApplet = new Lang.Class({
     _init: function() {
         this.parent('network-offline', _('Network'));
 
-        this.secondaryIcon = this.addIcon(new Gio.ThemedIcon({ name: 'network-vpn' }));
+        this.secondaryIcon = this.addIcon(new Gio.ThemedIcon({ name: 'network-vpn-symbolic' }));
         this.secondaryIcon.hide();
 
         this._isLocked = false;
@@ -1689,8 +1689,7 @@ const NMApplet = new Lang.Class({
     _ensureSource: function() {
         if (!this._source) {
             this._source = new MessageTray.Source(_("Network Manager"),
-                                                  'network-transmit-receive',
-                                                  St.IconType.SYMBOLIC);
+                                                  'network-transmit-receive-symbolic');
 
             this._source.connect('destroy', Lang.bind(this, function() {
                 this._source = null;
@@ -1761,7 +1760,6 @@ const NMApplet = new Lang.Class({
         this._ensureSource();
 
         let icon = new St.Icon({ icon_name: iconName,
-                                 icon_type: St.IconType.SYMBOLIC,
                                  icon_size: MessageTray.NOTIFICATION_ICON_SIZE });
         device._notification = new MessageTray.Notification(this._source, title, text,
                                                             { icon: icon });
@@ -1804,7 +1802,6 @@ const NMApplet = new Lang.Class({
         let wrapperClass = this._dtypes[device.get_device_type()];
         if (wrapperClass) {
             let wrapper = this._makeWrapperDevice(wrapperClass, device);
-
             let section = this._devices[wrapper.category].section;
             let devices = this._devices[wrapper.category].devices;
 
@@ -2075,7 +2072,7 @@ const NMApplet = new Lang.Class({
         this.actor.visible = this.mainIcon.visible && !this._isLocked;
 
         if (!this._client.networking_enabled) {
-            this.setIcon('network-offline');
+            this.setIcon('network-offline-symbolic');
             this._hideDevices();
             this._statusItem.label.text = _("Networking is disabled");
             this._statusSection.actor.show();
@@ -2093,22 +2090,22 @@ const NMApplet = new Lang.Class({
         let hasMobileIcon = false;
 
         if (!mc) {
-            this.setIcon('network-offline');
+            this.setIcon('network-offline-symbolic');
         } else if (mc.state == NetworkManager.ActiveConnectionState.ACTIVATING) {
             switch (mc._section) {
             case NMConnectionCategory.WWAN:
-                this.setIcon('network-cellular-acquiring');
+                this.setIcon('network-cellular-acquiring-symbolic');
                 break;
             case NMConnectionCategory.WIRELESS:
-                this.setIcon('network-wireless-acquiring');
+                this.setIcon('network-wireless-acquiring-symbolic');
                 break;
             case NMConnectionCategory.WIRED:
-                this.setIcon('network-wired-acquiring');
+                this.setIcon('network-wired-acquiring-symbolic');
                 break;
             default:
                 // fallback to a generic connected icon
                 // (it could be a private connection of some other user)
-                this.setIcon('network-wired-acquiring');
+                this.setIcon('network-wired-acquiring-symbolic');
             }
         } else {
             let dev;
@@ -2123,17 +2120,17 @@ const NMApplet = new Lang.Class({
                             log('An active wireless connection, in infrastructure mode, involves no access point?');
                             break;
                         }
-                        this.setIcon('network-wireless-connected');
+                        this.setIcon('network-wireless-connected-symbolic');
                     } else {
                         if (this._activeAccessPoint != ap) {
                             if (this._accessPointUpdateId)
                                 this._activeAccessPoint.disconnect(this._accessPointUpdateId);
                             this._activeAccessPoint = ap;
                             this._activeAccessPointUpdateId = ap.connect('notify::strength', Lang.bind(this, function() {
-                                this.setIcon('network-wireless-signal-' + signalToIcon(ap.strength));
+                                this.setIcon('network-wireless-signal-' + signalToIcon(ap.strength) + '-symbolic');
                             }));
                         }
-                        this.setIcon('network-wireless-signal-' + signalToIcon(ap.strength));
+                        this.setIcon('network-wireless-signal-' + signalToIcon(ap.strength) + '-symbolic');
                         hasApIcon = true;
                     }
                     break;
@@ -2142,7 +2139,7 @@ const NMApplet = new Lang.Class({
                     break;
                 }
             case NMConnectionCategory.WIRED:
-                this.setIcon('network-wired');
+                this.setIcon('network-wired-symbolic');
                 break;
             case NMConnectionCategory.WWAN:
                 dev = mc._primaryDevice;
@@ -2152,7 +2149,7 @@ const NMApplet = new Lang.Class({
                 }
                 if (!dev.mobileDevice) {
                     // this can happen for bluetooth in PAN mode
-                    this.setIcon('network-cellular-connected');
+                    this.setIcon('network-cellular-connected-symbolic');
                     break;
                 }
 
@@ -2161,16 +2158,16 @@ const NMApplet = new Lang.Class({
                         this._mobileUpdateDevice.disconnect(this._mobileUpdateId);
                     this._mobileUpdateDevice = dev.mobileDevice;
                     this._mobileUpdateId = dev.mobileDevice.connect('notify::signal-quality', Lang.bind(this, function() {
-                        this.setIcon('network-cellular-signal-' + signalToIcon(dev.mobileDevice.signal_quality));
+                        this.setIcon('network-cellular-signal-' + signalToIcon(dev.mobileDevice.signal_quality) + '-symbolic');
                     }));
                 }
-                this.setIcon('network-cellular-signal-' + signalToIcon(dev.mobileDevice.signal_quality));
+                this.setIcon('network-cellular-signal-' + signalToIcon(dev.mobileDevice.signal_quality) + '-symbolic');
                 hasMobileIcon = true;
                 break;
             default:
                 // fallback to a generic connected icon
                 // (it could be a private connection of some other user)
-                this.setIcon('network-wired');
+                this.setIcon('network-wired-symbolic');
                 break;
             }
         }
index 195422fad36ad1ff20cde5012316eeeaf9972883..ea765495653360e75cadd9d9898633ee9ae49a07 100644 (file)
@@ -52,7 +52,7 @@ const Indicator = new Lang.Class({
     Extends: PanelMenu.SystemStatusButton,
 
     _init: function() {
-        this.parent('battery-missing', _("Battery"));
+        this.parent('battery-missing-symbolic', _("Battery"));
 
         this._proxy = new PowerManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH);
 
@@ -182,7 +182,6 @@ const DeviceItem = new Lang.Class({
         this._label = new St.Label({ text: this._deviceTypeToString(device_type) });
 
         this._icon = new St.Icon({ gicon: Gio.icon_new_for_string(icon),
-                                   icon_type: St.IconType.SYMBOLIC,
                                    style_class: 'popup-menu-icon' });
 
         this._box.add_actor(this._icon);
index ab383dc4cdcdc03675d5fc9ae08c6ce8e6b8491c..70343d65d5ad887ea540576250bba0aab289ce2a 100644 (file)
@@ -156,14 +156,14 @@ const VolumeMenu = new Lang.Class({
 
     _volumeToIcon: function(volume) {
         if (volume <= 0) {
-            return 'audio-volume-muted';
+            return 'audio-volume-muted-symbolic';
         } else {
             let n = Math.floor(3 * volume / this._volumeMax) + 1;
             if (n < 2)
-                return 'audio-volume-low';
+                return 'audio-volume-low-symbolic';
             if (n >= 3)
-                return 'audio-volume-high';
-            return 'audio-volume-medium';
+                return 'audio-volume-high-symbolic';
+            return 'audio-volume-medium-symbolic';
         }
     },
 
@@ -197,7 +197,7 @@ const VolumeMenu = new Lang.Class({
         slider.setValue(muted ? 0 : (this[property].volume / this._volumeMax));
         if (property == '_output') {
             if (muted)
-                this.emit('icon-changed', 'audio-volume-muted');
+                this.emit('icon-changed', 'audio-volume-muted-symbolic');
             else
                 this.emit('icon-changed', this._volumeToIcon(this._output.volume));
         }
index ffa84dd44d9510bc46e4bb75ec8614dcada9f4e3..08218d7a715897664aa82915bb1ebcf9aa2704ef 100644 (file)
@@ -383,8 +383,7 @@ const Client = new Lang.Class({
     _ensureSubscriptionSource: function() {
         if (this._subscriptionSource == null) {
             this._subscriptionSource = new MessageTray.Source(_("Subscription request"),
-                                                              'gtk-dialog-question',
-                                                              St.IconType.FULLCOLOR);
+                                                              'gtk-dialog-question');
             Main.messageTray.add(this._subscriptionSource);
             this._subscriptionSource.connect('destroy', Lang.bind(this, function () {
                 this._subscriptionSource = null;
@@ -420,8 +419,7 @@ const Client = new Lang.Class({
     _ensureAccountSource: function() {
         if (this._accountSource == null) {
             this._accountSource = new MessageTray.Source(_("Connection error"),
-                                                         'gtk-dialog-error',
-                                                         St.IconType.FULLCOLOR);
+                                                         'gtk-dialog-error');
             Main.messageTray.add(this._accountSource);
             this._accountSource.connect('destroy', Lang.bind(this, function () {
                 this._accountSource = null;
@@ -497,7 +495,6 @@ const ChatSource = new Lang.Class({
             this._iconBox.child = textureCache.load_uri_async(uri, this._iconBox._size, this._iconBox._size);
         } else {
             this._iconBox.child = new St.Icon({ icon_name: 'avatar-default',
-                                                icon_type: St.IconType.FULLCOLOR,
                                                 icon_size: this._iconBox._size });
         }
 
@@ -506,8 +503,7 @@ const ChatSource = new Lang.Class({
 
     createSecondaryIcon: function() {
         let iconBox = new St.Bin();
-        iconBox.child = new St.Icon({ style_class: 'secondary-icon',
-                                      icon_type: St.IconType.FULLCOLOR });
+        iconBox.child = new St.Icon({ style_class: 'secondary-icon' });
         let presenceType = this._contact.get_presence_type();
 
         switch (presenceType) {
@@ -1197,7 +1193,6 @@ const SubscriptionRequestNotification = new Lang.Class({
         }
         else {
             iconBox.child = new St.Icon({ icon_name: 'avatar-default',
-                                          icon_type: St.IconType.FULLCOLOR,
                                           icon_size: iconBox._size });
         }
 
index 7b05145cd12e5d6dfa6f84e0c330e18612fd61c8..3d8c7f26dc8f05051b07cde3d2c093a79c7fadfb 100644 (file)
@@ -67,7 +67,6 @@ const UserAvatarWidget = new Lang.Class({
         } else {
             this.actor.style = null;
             this.actor.child = new St.Icon({ icon_name: 'avatar-default',
-                                             icon_type: St.IconType.SYMBOLIC,
                                              icon_size: DIALOG_ICON_SIZE });
         }
     }
@@ -164,22 +163,22 @@ const IMStatusChooserItem = new Lang.Class({
 
         let item;
 
-        item = new IMStatusItem(_("Available"), 'user-available');
+        item = new IMStatusItem(_("Available"), 'user-available-symbolic');
         this._combo.addMenuItem(item, IMStatus.AVAILABLE);
 
-        item = new IMStatusItem(_("Busy"), 'user-busy');
+        item = new IMStatusItem(_("Busy"), 'user-busy-symbolic');
         this._combo.addMenuItem(item, IMStatus.BUSY);
 
-        item = new IMStatusItem(_("Invisible"), 'user-invisible');
+        item = new IMStatusItem(_("Invisible"), 'user-invisible-symbolic');
         this._combo.addMenuItem(item, IMStatus.HIDDEN);
 
-        item = new IMStatusItem(_("Away"), 'user-away');
+        item = new IMStatusItem(_("Away"), 'user-away-symbolic');
         this._combo.addMenuItem(item, IMStatus.AWAY);
 
-        item = new IMStatusItem(_("Idle"), 'user-idle');
+        item = new IMStatusItem(_("Idle"), 'user-idle-symbolic');
         this._combo.addMenuItem(item, IMStatus.IDLE);
 
-        item = new IMStatusItem(_("Unavailable"), 'user-offline');
+        item = new IMStatusItem(_("Unavailable"), 'user-offline-symbolic');
         this._combo.addMenuItem(item, IMStatus.OFFLINE);
 
         this._combo.connect('active-item-changed',
@@ -480,17 +479,17 @@ const UserMenuButton = new Lang.Class({
         box.add(this._iconBox, { y_align: St.Align.MIDDLE, y_fill: false });
 
         let textureCache = St.TextureCache.get_default();
-        this._offlineIcon = new St.Icon({ icon_name: 'user-offline',
+        this._offlineIcon = new St.Icon({ icon_name: 'user-offline-symbolic',
                                           style_class: 'popup-menu-icon' });
-        this._availableIcon = new St.Icon({ icon_name: 'user-available',
+        this._availableIcon = new St.Icon({ icon_name: 'user-available-symbolic',
                                             style_class: 'popup-menu-icon' });
-        this._busyIcon = new St.Icon({ icon_name: 'user-busy',
+        this._busyIcon = new St.Icon({ icon_name: 'user-busy-symbolic',
                                        style_class: 'popup-menu-icon' });
-        this._invisibleIcon = new St.Icon({ icon_name: 'user-invisible',
+        this._invisibleIcon = new St.Icon({ icon_name: 'user-invisible-symbolic',
                                             style_class: 'popup-menu-icon' });
-        this._awayIcon = new St.Icon({ icon_name: 'user-away',
+        this._awayIcon = new St.Icon({ icon_name: 'user-away-symbolic',
                                        style_class: 'popup-menu-icon' });
-        this._idleIcon = new St.Icon({ icon_name: 'user-idle',
+        this._idleIcon = new St.Icon({ icon_name: 'user-idle-symbolic',
                                        style_class: 'popup-menu-icon' });
         this._pendingIcon = new St.Icon({ icon_name: 'user-status-pending',
                                           style_class: 'popup-menu-icon' });
index 36626b2754061cc383be5ff6d57188533f37104e..1d4a95345ce4a57d5663a639a6ccd6ac6207fef7 100644 (file)
@@ -73,11 +73,9 @@ const ViewSelector = new Lang.Class({
         global.stage.connect('notify::key-focus', Lang.bind(this, this._onStageKeyFocusChanged));
 
         this._inactiveIcon = new St.Icon({ style_class: 'search-entry-icon',
-                                           icon_name: 'edit-find',
-                                           icon_type: St.IconType.SYMBOLIC });
+                                           icon_name: 'edit-find-symbolic' });
         this._activeIcon = new St.Icon({ style_class: 'search-entry-icon',
-                                         icon_name: 'edit-clear',
-                                         icon_type: St.IconType.SYMBOLIC });
+                                         icon_name: 'edit-clear-symbolic' });
         this._entry.set_secondary_icon(this._inactiveIcon);
 
         this._iconClickedId = 0;
@@ -85,15 +83,15 @@ const ViewSelector = new Lang.Class({
 
         this._workspacesDisplay = new WorkspacesView.WorkspacesDisplay();
         this._workspacesPage = this._addPage(this._workspacesDisplay.actor, null,
-                                             _("Windows"), 'text-x-generic');
+                                             _("Windows"), 'text-x-generic-symbolic');
 
         this._appDisplay = new AppDisplay.AllAppDisplay();
         this._appsPage = this._addPage(this._appDisplay.actor, null,
-                                       _("Applications"), 'system-run');
+                                       _("Applications"), 'system-run-symbolic');
 
         this._searchResults = new SearchDisplay.SearchResults(this._searchSystem);
         this._searchPage = this._addPage(this._searchResults.actor, this._entry,
-                                         _("Search"), 'edit-find');
+                                         _("Search"), 'edit-find-symbolic');
 
         // Default search providers
         // Wanda comes obviously first
index e02e7f4586b029d86433c25356c6b6a629c209f9..c37ff299233a771eb1635fd9879b19943ed3bd2a 100644 (file)
@@ -55,9 +55,7 @@ const WandaIcon = new Lang.Class({
 
         if (!this._imageFile) {
             return new St.Icon({ icon_name: 'face-smile',
-                                 icon_type: St.IconType.FULLCOLOR,
-                                 icon_size: iconSize
-                               });
+                                 icon_size: iconSize });
         }
 
         this._animations = St.TextureCache.get_default().load_sliced_image(this._imageFile, this._imgWidth, this._imgHeight);
@@ -183,7 +181,6 @@ const WandaSearchProvider = new Lang.Class({
                         // triggers an assertion failure)
                         return St.TextureCache.get_default().load_icon_name(null,
                                                                             'face-smile',
-                                                                            St.IconType.FULLCOLOR,
                                                                             iconSize);
                     }
                   }]);
index 222bcb32594bae6fd5c849980be5906940ea4301..988271f6d163b4a3e4a5906dbf0974e494636f83 100644 (file)
@@ -59,8 +59,7 @@ function init() {
                           x_fill: true,
                           y_fill: false,
                           track_hover: true });
-    let icon = new St.Icon({ icon_name: 'system-run',
-                             icon_type: St.IconType.SYMBOLIC,
+    let icon = new St.Icon({ icon_name: 'system-run-symbolic',
                              style_class: 'system-status-icon' });
 
     button.set_child(icon);
index a035cd264da5f3a08423f58a7ab80c343de8e4f9..e4c35a286ebce854eba0bf952a1100f33550b083 100644 (file)
@@ -172,8 +172,7 @@ show_capslock_feedback (StEntry *entry)
     {
       ClutterActor *icon = g_object_new (ST_TYPE_ICON,
                                          "style-class", "capslock-warning",
-                                         "icon-type", ST_ICON_SYMBOLIC,
-                                         "icon-name", "dialog-warning",
+                                         "icon-name", "dialog-warning-symbolic",
                                          NULL);
 
       st_entry_set_secondary_icon (entry, icon);
index ba04a5b360db4e26ff8748e890fdd7224d9c0190..d608672645bb129ea145e5feaac35075240601a3 100644 (file)
@@ -37,7 +37,6 @@ enum
 
   PROP_GICON,
   PROP_ICON_NAME,
-  PROP_ICON_TYPE,
   PROP_ICON_SIZE
 };
 
@@ -53,7 +52,6 @@ struct _StIconPrivate
   guint         opacity_handler_id;
 
   GIcon        *gicon;
-  StIconType    icon_type;
   gint          prop_icon_size;  /* icon size set as property */
   gint          theme_icon_size; /* icon size from theme node */
   gint          icon_size;       /* icon size we are using */
@@ -68,7 +66,6 @@ static void st_icon_update               (StIcon *icon);
 static gboolean st_icon_update_icon_size (StIcon *icon);
 
 #define DEFAULT_ICON_SIZE 48
-#define DEFAULT_ICON_TYPE ST_ICON_SYMBOLIC
 
 static void
 st_icon_set_property (GObject      *gobject,
@@ -88,10 +85,6 @@ st_icon_set_property (GObject      *gobject,
       st_icon_set_icon_name (icon, g_value_get_string (value));
       break;
 
-    case PROP_ICON_TYPE:
-      st_icon_set_icon_type (icon, g_value_get_enum (value));
-      break;
-
     case PROP_ICON_SIZE:
       st_icon_set_icon_size (icon, g_value_get_int (value));
       break;
@@ -120,10 +113,6 @@ st_icon_get_property (GObject    *gobject,
       g_value_set_string (value, st_icon_get_icon_name (icon));
       break;
 
-    case PROP_ICON_TYPE:
-      g_value_set_enum (value, st_icon_get_icon_type (icon));
-      break;
-
     case PROP_ICON_SIZE:
       g_value_set_int (value, st_icon_get_icon_size (icon));
       break;
@@ -343,14 +332,6 @@ st_icon_class_init (StIconClass *klass)
                                NULL, ST_PARAM_READWRITE | G_PARAM_DEPRECATED);
   g_object_class_install_property (object_class, PROP_ICON_NAME, pspec);
 
-  pspec = g_param_spec_enum ("icon-type",
-                             "Icon type",
-                             "The type of icon that should be used",
-                             ST_TYPE_ICON_TYPE,
-                             DEFAULT_ICON_TYPE,
-                             ST_PARAM_READWRITE | G_PARAM_DEPRECATED);
-  g_object_class_install_property (object_class, PROP_ICON_TYPE, pspec);
-
   pspec = g_param_spec_int ("icon-size",
                             "Icon size",
                             "The size if the icon, if positive. Otherwise the size will be derived from the current style",
@@ -366,7 +347,6 @@ st_icon_init (StIcon *self)
 
   self->priv->icon_size = DEFAULT_ICON_SIZE;
   self->priv->prop_icon_size = -1;
-  self->priv->icon_type = DEFAULT_ICON_TYPE;
 
   self->priv->shadow_material = COGL_INVALID_HANDLE;
   self->priv->shadow_width = -1;
@@ -564,12 +544,7 @@ st_icon_set_icon_name (StIcon      *icon,
     g_object_unref (priv->gicon);
 
   if (icon_name)
-    {
-      if (priv->icon_type == ST_ICON_SYMBOLIC)
-        priv->gicon = _st_make_symbolic_themed_icon (icon_name);
-      else
-        priv->gicon = g_themed_icon_new_with_default_fallbacks (icon_name);
-    }
+    priv->gicon = g_themed_icon_new_with_default_fallbacks (icon_name);
   else
     priv->gicon = NULL;
 
@@ -579,52 +554,6 @@ st_icon_set_icon_name (StIcon      *icon,
   st_icon_update (icon);
 }
 
-/**
- * st_icon_get_icon_type:
- * @icon: a #StIcon
- *
- * Gets the type of icon we'll look up to display in the actor.
- * See st_icon_set_icon_type().
- *
- * Return value: the icon type.
- */
-StIconType
-st_icon_get_icon_type (StIcon *icon)
-{
-  g_return_val_if_fail (ST_IS_ICON (icon), DEFAULT_ICON_TYPE);
-
-  return icon->priv->icon_type;
-}
-
-/**
- * st_icon_set_icon_type:
- * @icon: a #StIcon
- * @icon_type: the type of icon to use
- *
- * Sets the type of icon we'll look up to display in the actor.
- * The icon type determines whether we use a symbolic icon or
- * a full color icon and also is used for specific handling for
- * application and document icons.
- */
-void
-st_icon_set_icon_type (StIcon     *icon,
-                       StIconType  icon_type)
-{
-  StIconPrivate *priv;
-
-  g_return_if_fail (ST_IS_ICON (icon));
-
-  priv = icon->priv;
-
-  if (icon_type == priv->icon_type)
-    return;
-
-  priv->icon_type = icon_type;
-  st_icon_update (icon);
-
-  g_object_notify (G_OBJECT (icon), "icon-type");
-}
-
 /**
  * st_icon_get_gicon:
  * @icon: an icon
index eac4a164f4e9fad10925355475af42e051eedd45..cb7b5688f95e67341d70c2b4404d901c4d8fc445 100644 (file)
@@ -88,9 +88,6 @@ ClutterActor* st_icon_new (void);
 const gchar *st_icon_get_icon_name (StIcon *icon);
 void         st_icon_set_icon_name (StIcon *icon, const gchar *icon_name);
 
-void         st_icon_set_icon_type (StIcon *icon, StIconType icon_type);
-StIconType   st_icon_get_icon_type (StIcon *icon);
-
 gint         st_icon_get_icon_size (StIcon *icon);
 void         st_icon_set_icon_size (StIcon *icon, gint size);
 
index b34b3e4830a517bcb800d7bdbbcc7fa1ecafa181..bab1d3c31db5e651f85491d4e78a471b5a3d119c 100644 (file)
@@ -691,55 +691,3 @@ _st_paint_shadow_with_opacity (StShadow        *shadow_spec,
                                       shadow_box.x2, shadow_box.y2,
                                       0, 0, 1, 1);
 }
-
-/* generates names like g_themed_icon_new_with_default_fallbacks(),
- * but *only* symbolic names
- */
-static char **
-symbolic_names_for_icon (const char *name)
-{
-  char **parts, **names;
-  int i, numnames;
-
-  parts = g_strsplit (name, "-", -1);
-  numnames = g_strv_length (parts);
-  names = g_new (char *, numnames + 1);
-  for (i = 0; parts[i]; i++)
-    {
-      if (i == 0)
-        {
-          names[i] = g_strdup_printf ("%s-symbolic", parts[i]);
-        }
-      else
-        {
-          names[i] = g_strdup_printf ("%.*s-%s-symbolic",
-                                      (int) (strlen (names[i - 1]) - strlen ("-symbolic")),
-                                      names[i - 1], parts[i]);
-        }
-    }
-  names[i] = NULL;
-
-  g_strfreev (parts);
-
-  /* need to reverse here, because longest (most specific)
-     name has to come first */
-  for (i = 0; i < (numnames / 2); i++) {
-    char *tmp = names[i];
-    names[i] = names[numnames - i - 1];
-    names[numnames - i - 1] = tmp;
-  }
-  return names;
-}
-
-GIcon *
-_st_make_symbolic_themed_icon (const char *icon_name)
-{
-  char **names;
-  GIcon *themed;
-
-  names = symbolic_names_for_icon (icon_name);
-  themed = g_themed_icon_new_from_names (names, -1);
-  g_strfreev (names);
-
-  return themed;
-}
index 87edff9e5e17b48c9c95f2ee5a9914ffa5cc0676..c8ee4952342c89f31e1c24d1a37f16f9f4caa488 100644 (file)
@@ -79,6 +79,4 @@ void _st_paint_shadow_with_opacity (StShadow        *shadow_spec,
                                     ClutterActorBox *box,
                                     guint8           paint_opacity);
 
-GIcon *_st_make_symbolic_themed_icon (const char    *icon_name);
-
 #endif /* __ST_PRIVATE_H__ */
index 67c7c5292414b16e2d8d135ab1cf32ddd0b097c9..c271c04d0b15394745486f3090988d45f38360fd 100644 (file)
@@ -1121,29 +1121,15 @@ st_texture_cache_load_sliced_image (StTextureCache    *cache,
   return actor;
 }
 
-/**
- * StIconType:
- * @ST_ICON_SYMBOLIC: a symbolic (ie, mostly monochrome) icon
- * @ST_ICON_FULLCOLOR: a full-color icon
- *
- * Describes what style of icon is desired in a call to
- * st_texture_cache_load_icon_name() or st_texture_cache_load_gicon().
- * Use %ST_ICON_SYMBOLIC for symbolic icons (eg, for the panel and
- * much of the rest of the shell chrome) or %ST_ICON_FULLCOLOR for a
- * full-color icon.
- */
-
 /**
  * st_texture_cache_load_icon_name:
  * @cache: The texture cache instance
  * @theme_node: (allow-none): a #StThemeNode
  * @name: Name of a themed icon
- * @icon_type: the type of icon to load
  * @size: Size of themed icon
  *
- * Load a themed icon into a texture. See the #StIconType documentation
- * for an explanation of how @icon_type affects the returned icon. The
- * colors used for symbolic icons are derived from @theme_node.
+ * Load a themed icon into a texture. The colors used for symbolic
+ * icons are derived from @theme_node.
  *
  * Return Value: (transfer none): A new #ClutterTexture for the icon
  */
@@ -1151,47 +1137,23 @@ ClutterActor *
 st_texture_cache_load_icon_name (StTextureCache    *cache,
                                  StThemeNode       *theme_node,
                                  const char        *name,
-                                 StIconType         icon_type,
                                  gint               size)
 {
   ClutterActor *texture;
   GIcon *themed;
 
-  g_return_val_if_fail (!(icon_type == ST_ICON_SYMBOLIC && theme_node == NULL), NULL);
+  themed = g_themed_icon_new_with_default_fallbacks (name);
+  texture = load_gicon_with_colors (cache, themed, size,
+                                    theme_node ? st_theme_node_get_icon_colors (theme_node) : NULL);
+  g_object_unref (themed);
 
-  switch (icon_type)
+  if (texture == NULL)
     {
-    case ST_ICON_SYMBOLIC:
-      themed = _st_make_symbolic_themed_icon (name);
-      texture = load_gicon_with_colors (cache, themed, size,
-                                        st_theme_node_get_icon_colors (theme_node));
-      g_object_unref (themed);
-      if (texture == NULL)
-        {
-          /* We don't have an equivalent of image-missing
-           * for the symbolic icon theme, so just create a blank
-           * actor. */
-          texture = (ClutterActor *) create_default_texture ();
-          clutter_actor_set_size (texture, size, size);
-        }
-
-      return texture;
-      break;
-    case ST_ICON_FULLCOLOR:
-      themed = g_themed_icon_new_with_default_fallbacks (name);
-      texture = load_gicon_with_colors (cache, themed, size, NULL);
-      g_object_unref (themed);
-      if (texture == NULL)
-        {
-          themed = g_themed_icon_new ("image-missing");
-          texture = load_gicon_with_colors (cache, themed, size, NULL);
-          g_object_unref (themed);
-        }
-      return texture;
-      break;
-    default:
-      g_assert_not_reached ();
+      texture = (ClutterActor *) create_default_texture ();
+      clutter_actor_set_size (texture, size, size);
     }
+
+  return texture;
 }
 
 /**
index ce9f1d648933de48cbdb764aa872a9c801c8b979..fc7dac294d2ad2095e07693c3139138e0d2bd834 100644 (file)
@@ -81,7 +81,6 @@ ClutterActor *st_texture_cache_bind_pixbuf_property (StTextureCache    *cache,
 ClutterActor *st_texture_cache_load_icon_name (StTextureCache *cache,
                                                StThemeNode    *theme_node,
                                                const char     *name,
-                                               StIconType      icon_type,
                                                gint            size);
 
 ClutterActor *st_texture_cache_load_gicon (StTextureCache *cache,
index 13bf3f8871c5a213d135f4769950dd323c45c278..d204041393706e91b2cdf36b176569adaca0cd97 100644 (file)
@@ -40,11 +40,6 @@ typedef enum {
   ST_ALIGN_END
 } StAlign;
 
-typedef enum {
-  ST_ICON_SYMBOLIC,
-  ST_ICON_FULLCOLOR
-} StIconType;
-
 typedef enum {
   ST_BACKGROUND_SIZE_AUTO,
   ST_BACKGROUND_SIZE_CONTAIN,
index 0d074e1ce2135ee0f389fddc610bec5f176fec9d..64cf898d1cb19104c7b5277f74e260faa0750c53 100644 (file)
@@ -28,27 +28,21 @@ function test() {
     }
 
     addTest("Symbolic",
-            { icon_name: 'battery-full',
-              icon_type: St.IconType.SYMBOLIC,
+            { icon_name: 'battery-full-symbolic',
               icon_size: 48 });
     addTest("Full color",
             { icon_name: 'battery-full',
-              icon_type: St.IconType.FULLCOLOR,
               icon_size: 48 });
     addTest("Default size",
-            { icon_name: 'battery-full',
-              icon_type: St.IconType.SYMBOLIC });
+            { icon_name: 'battery-full-symbolic' });
     addTest("Size set by property",
-            { icon_name: 'battery-full',
-              icon_type: St.IconType.SYMBOLIC,
+            { icon_name: 'battery-full-symbolic',
               icon_size: 32 });
     addTest("Size set by style",
-            { icon_name: 'battery-full',
-              icon_type: St.IconType.SYMBOLIC,
+            { icon_name: 'battery-full-symbolic',
               style: 'icon-size: 1em;' });
     addTest("16px icon in 48px icon widget",
-            { icon_name: 'battery-full',
-              icon_type: St.IconType.SYMBOLIC,
+            { icon_name: 'battery-full-symbolic',
               style: 'icon-size: 16px; width: 48px; height: 48px; border: 1px solid black;' });
 
     function iconRow(icons, box_style) {
@@ -56,7 +50,6 @@ function test() {
 
         for each (let iconName in icons) {
             hb.add(new St.Icon({ icon_name: iconName,
-                                 icon_type: St.IconType.SYMBOLIC,
                                  icon_size: 48 }));
         }
 
@@ -66,16 +59,16 @@ function test() {
     let normalCss = 'background: white; color: black; padding: 10px 10px;';
     let reversedCss = 'background: black; color: white; warning-color: #ffcc00; error-color: #ff0000; padding: 10px 10px;';
 
-    let batteryIcons = ['battery-full-charging',
-                        'battery-full',
-                        'battery-good',
-                        'battery-low',
-                        'battery-caution' ];
+    let batteryIcons = ['battery-full-charging-symbolic',
+                        'battery-full-symbolic',
+                        'battery-good-symbolic',
+                        'battery-low-symbolic',
+                        'battery-caution-symbolic' ];
 
-    let volumeIcons = ['audio-volume-high',
-                       'audio-volume-medium',
-                       'audio-volume-low',
-                       'audio-volume-muted' ];
+    let volumeIcons = ['audio-volume-high-symbolic',
+                       'audio-volume-medium-symbolic',
+                       'audio-volume-low-symbolic',
+                       'audio-volume-muted-symbolic' ];
 
     iconRow(batteryIcons, normalCss);
     iconRow(batteryIcons, reversedCss);